package lab02.test13;

/**
 * Created by lenovo on 2017/10/20.
 */
public class School extends ComputerAverage{
    //总分除以总科目
    @Override
    public double average(double[] scores) {
        double sum = 0;
        double average;

        //求总分
        for (int i = 0;i < scores.length;i ++){
            sum = scores[i] + sum;
        }

        //求平均分
        average = sum / scores.length;
        return average;
    }
}
